package com.bkhech.spring.springmvc.method_argument_resolver;

import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * Web config
 *
 * @author guowm
 * @date 2023/2/3
 */
@Configuration
@RequiredArgsConstructor
public class RequestKey2CamelCaseWebConfig implements WebMvcConfigurer {

    final RequestKey2CamelCaseMethodArgumentResolver requestKey2CamelCaseMethodArgumentResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(requestKey2CamelCaseMethodArgumentResolver);
    }
}
